package com.college.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotEmpty;



@Entity
@Table(name="COLLEGE")
public class College {
	
	private int collegeId;
	@NotEmpty
	@Size(min=12, max=85)
	private String collegeName;
	@NotEmpty
	@Size(min=10, max=25)
	private String addressLine1;
	@NotEmpty
	@Size(min=10, max=25)
	private String addressLine2;
	private String addressLine3;
	@NotEmpty
	@Size(min=6, max=6)
	private String pinCode;
	@NotEmpty
	@Size(min=10, max=12)
	private String phoneNumber;
	
	public College(){
		
	}

	public College(int collegeId, String collegeName, String addressLine1,
			String addressLine2, String addressLine3, String pinCode,
			String phoneNumber) {
		super();
		this.collegeId = collegeId;
		this.collegeName = collegeName;
		this.addressLine1 = addressLine1;
		this.addressLine2 = addressLine2;
		this.addressLine3 = addressLine3;
		this.pinCode = pinCode;
		this.phoneNumber = phoneNumber;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="COLLEGE_ID", columnDefinition="AUTO_INCREMENT")
	public int getCollegeId() {
		return collegeId;
	}

	public void setCollegeId(int collegeId) {
		this.collegeId = collegeId;
	}
	@Column(name="COLLEGE_NAME") 
	public String getCollegeName() {
		return collegeName;
	}

	public void setCollegeName(String collegeName) {
		this.collegeName = collegeName;
	}
	@Column(name="ADDRESS_LINE_1")
	public String getAddressLine1() {
		return addressLine1;
	}

	public void setAddressLine1(String addressLine1) {
		this.addressLine1 = addressLine1;
	}
	@Column(name="ADDRESS_LINE2")
	public String getAddressLine2() {
		return addressLine2;
	}

	public void setAddressLine2(String addressLine2) {
		this.addressLine2 = addressLine2;
	}
	@Column(name="ADDRESS_LINE3")
	public String getAddressLine3() {
		return addressLine3;
	}

	public void setAddressLine3(String addressLine3) {
		this.addressLine3 = addressLine3;
	}
	@Column(name="PINCODE")
	public String getPinCode() {
		return pinCode;
	}

	public void setPinCode(String pinCode) {
		this.pinCode = pinCode;
	}
	@Column(name="PHONE_NUMBER")
	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	
	
	

}
